package com.meme.editor.model.sprite2d;

import org.apache.log4j.Logger;

import com.meme.editor.EntityRefLink;

// here, for efficiency, the class Tiled2dLayerCell doesn't extends ModuleRef

public class Tiled2dLayerCell // extends ModuleRef
{
	static Logger logger = Logger.getLogger (Tiled2dLayerCell.class);

	EntityRefLink mRefedModule;
	boolean mFlipX;
	boolean mFlipY;
	int     mPaletteID;
	
	public Tiled2dLayerCell (Tiled2dLayer layer)
	{
		mRefedModule = new EntityRefLink (layer);
		
		mFlipX = false;
		mFlipY = false;
		mPaletteID = 0;
	}
	
	public void setModule (Module module)
	{
		mRefedModule.setRefedEntity (module);
	}
	
	public Module getModule ()
	{
		return (Module) mRefedModule.getRefedEntity();
	}
	
	public void setFlipX (boolean flip)
	{
		mFlipX = flip;
	}
	
	public boolean isFlipX ()
	{
		return mFlipX;
	}
	
	public void setFlipY (boolean flip)
	{
		mFlipY = flip;
	}
	
	public boolean isFlipY ()
	{
		return mFlipY;
	}

	public void setPaletteID (int palID)
	{
		mPaletteID = palID;
	}
	
	public int getPaletteID ()
	{
		return mPaletteID;
	}

}
